My first markdown document

To show both the code and the results if you put eval= false than you only obtain the results without the code

Here you can add some text

2+3
## [1] 5

Using proper packages:

library(imageRy)
im.list()
##  [1] "dolansprings_oli_2013088_canyon_lrg.jpg"           
##  [2] "EN_01.png"                                         
##  [3] "EN_02.png"                                         
##  [4] "EN_03.png"                                         
##  [5] "EN_04.png"                                         
##  [6] "EN_05.png"                                         
##  [7] "EN_06.png"                                         
##  [8] "EN_07.png"                                         
##  [9] "EN_08.png"                                         
## [10] "EN_09.png"                                         
## [11] "EN_10.png"                                         
## [12] "EN_11.png"                                         
## [13] "EN_12.png"                                         
## [14] "EN_13.png"                                         
## [15] "greenland.2000.tif"                                
## [16] "greenland.2005.tif"                                
## [17] "greenland.2010.tif"                                
## [18] "greenland.2015.tif"                                
## [19] "info.md"                                           
## [20] "iss063e039892_lrg.jpg"                             
## [21] "matogrosso_ast_2006209_lrg.jpg"                    
## [22] "matogrosso_l5_1992219_lrg.jpg"                     
## [23] "NDVI_rainbow_legend.png"                           
## [24] "NDVI_rainbow.png"                                  
## [25] "sentinel.dolomites.b2.tif"                         
## [26] "sentinel.dolomites.b3.tif"                         
## [27] "sentinel.dolomites.b4.tif"                         
## [28] "sentinel.dolomites.b8.tif"                         
## [29] "sentinel.png"                                      
## [30] "Solar_Orbiter_s_first_views_of_the_Sun_pillars.jpg"

Lets import the mato grosso area image without warinings we set warning to false:

mato1992 <-im.import("matogrosso_l5_1992219_lrg.jpg")

EXERCISE To make an RGB image with the green on the red

im.plotRGB(mato1992, r=2, g=1, b=3)

par(mfrow=c(2,2))
im.plotRGB(mato1992, r=1, g=2, b=3)
im.plotRGB(mato1992, r=2, g=1, b=3)
im.plotRGB(mato1992, r=3, g=1, b=2)
im.plotRGB(mato1992, r=1, g=3, b=1)

Calculating spectral indices:

library(terra)
## terra 1.7.55
library(viridisLite)
dvi <-mato1992[[1]]-mato1992[[2]]
viridisc <-colorRampPalette(viridis(7))(255)
plot(dvi, col=viridisc)

Calculating variability:

sd5 <- focal(mato1992[[1]], matrix(1/25, 5, 5), fun=sd)
plot(sd5, col=viridisc)